package cn.edu.zut.sunday.blimp.domain;

import cn.edu.zut.sunday.base.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "dataset_name")
public class DatasetName extends BaseEntity<Integer> {

    @Column(name = "set_name")
    private String setName;

    @Column(name = "data_count")
    private long dataCount;

    @Column(name = "md5", length = 256)
    private String md5;

    @Column(name = "suffix", length = 16)
    private String suffix;

    @JsonIgnore
    @OneToMany(mappedBy="datasetName", cascade = {CascadeType.ALL})
    private List<ExampleInfo> exampleInfos;
}
